import { Column, Table } from '../../Index'

export interface User {
  id?: number
  email: string
  password: string
}

class UserTable extends Table<User> {
  override tableName: string = 't_user'
  readonly id = Column.integer('id').primaryKey(true).bindTo(this, 'id')
  readonly email = Column.text('email').notNull().bindTo(this, 'email')
  readonly password = Column.text('password').notNull().bindTo(this, 'password')
}

export default new UserTable()